Image encoder and decoder using unidirectional prediction

ABSTRACT

The present invention relates to an image encoding and decoding technique, and more particularly, to an image encoder and decoder using unidirectional prediction. The image encoder includes a dividing unit to divide a macro block into a plurality of sub-blocks, a unidirectional application determining unit to determine whether an identical prediction mode is applied to each of the plurality of sub-blocks, and a prediction mode determining unit to determine a prediction mode with respect to each of the plurality of sub-blocks based on a determined result of the unidirectional application determining unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/388,429, filed on Apr. 18, 2019, which is a continuation of U.S.patent application Ser. No. 15/288,942 filed on Oct. 7, 2016 and issuedon Jun. 11, 2019 as U.S. Pat. No. 10,321,137, which is a continuation ofU.S. patent application Ser. No. 15/192,627 filed on Jun. 24, 2016 andissued on Apr. 10, 2018 as U.S. Pat. No. 9,942,554, which is acontinuation of U.S. patent application Ser. No. 14/469,288 filed onAug. 26, 2014 and issued on Aug. 2, 2016 as U.S. Pat. No. 9,407,937,which is a continuation of U.S. patent application Ser. No. 13/738,463filed on Jan. 10, 2013 and issued on Oct. 21, 2014 as U.S. Pat. No.8,867,854, which is a continuation of U.S. patent application Ser. No.13/129,570 filed on May 16, 2011 and issued on Jan. 29, 2013 as U.S.Pat. No. 8,363,965, which is a national stage application ofPCT/KR2009/005647 filed on Oct. 1, 2009 and claims priority of Koreanpatent application numbers 10-2008-0096658, 10-2009-0001240, and10-2009-0093128 filed on Oct. 1, 2008, Jan. 7, 2009, and Sep. 30, 2009,respectively. The disclosure of each of the foregoing applications isincorporated herein by reference in its entirety.

TECHNICAL FIELD

The present invention relates to an image encoding and decodingtechnique, and more particularly, to an image encoder and decoder usingunidirectional prediction.

BACKGROUND ART

In video compression technologies such as Moving Picture Experts Group(MPEG) 4 and H.264 standards, various prediction schemes may be used toimprove a compression effect. Of these, an intra prediction encodingscheme may be generally used.

An intra prediction mode may generate a prediction image using referencepixels existing at a periphery of a sub-block with respect to aplurality of sub-blocks included in a macro block, and may perform adifferentiation with a current block intended to be encoded to generatea difference image. Depending on a location of the reference pixel withrespect to each of the plurality of sub-blocks, a specific predictionmode may be determined.

The intra prediction encoding scheme may support an intra 16×16 encodingmode and an intra 4×4 encoding mode according to a size of thesub-block, and the H.264 standard may even support an intra 8×8 encodingmode.

The generated difference image may be transformed using a DiscreteCosine Transformation (DCT), a quantization process, and an entrophytransformation. In the intra prediction encoding scheme, a number ofbits in the transformed image may be calculated based on each predictionmode, and a distortion rate with an encoded block may be calculated tothereby calculate a bit-distortion rate with respect to each predictionmode. In this instance, a mode having a minimal bit-distortion rate maybe determined as an optimal mode for performing an encoding with respectto the mode determined as the optimal mode.

Basically, the H.264 standard may perform encoding/decoding in a macroblock unit of a 16×16 block. The intra 4×4 encoding mode may have a 4×4sized sub-block. Accordingly, the intra 4×4 encoding mode may divide themacro block into 16 sub-blocks for the purpose of generating theprediction image. In the intra 4×4 encoding mode, 16 prediction modeinformation with respect to each sub-block may be needed. Similarly, inthe intra 8×8 encoding mode, 4 prediction mode information may be neededdue to a sub-block size of 8×8.

Accordingly, in the conventional H.264 moving picture compressionstandard, the intra 4×4 encoding mode information may be reduced using aMost Probable Mode (MPM), thereby improving an encoding efficiency.

However, in the conventional moving picture compression standard, a casewhere the intra prediction mode and an practical encoding mode areidentical to each other in the intra 4×4 encoding mode may beconsecutively generated, and thereby unidirectional flag information maybe required to be added to reduce a number of bits to be encoded.

DISCLOSURE OF INVENTION

Technical Goals

An aspect of the present invention provides an image encoder and decoderusing unidirectional prediction that may improve an encoding efficiencyof an image.

An aspect of the present invention provides an image encoder and decoderusing unidirectional prediction that may effectively encode an image,thereby reducing a capacity of the encoded image.

Technical Solutions

According to an aspect of the present invention, there is provided animage encoder, including: a dividing unit to divide a macro block into aplurality of sub-blocks; a unidirectional application determining unitto determine whether an identical prediction mode is applied to each ofthe plurality of sub-blocks; and a prediction mode determining unit todetermine a prediction mode with respect to each of the plurality ofsub-blocks based on a determined result of the unidirectionalapplication determining unit.

According to an aspect of the present invention, there is provided animage encoder, including: a dividing unit to divide a macro block into aplurality of sub-blocks; a prediction mode determining unit to determinea prediction mode with respect to each of the plurality of sub-blocks;and an encoding order determining unit to determine an encoding orderwith respect to each of the plurality of sub-blocks based on theprediction mode of the each of the plurality of sub-blocks.

According to an aspect of the present invention, there is provided animage decoder, including: a unidirectional application determining unitto determine whether an identical prediction mode is applied to each ofa plurality of sub-blocks included in a macro block; and a decoding unitto decode each of the plurality of sub-blocks based on a determinedresult of the unidirectional application determining unit.

According to the present invention, an encoding efficiency of an imagemay be improved.

According to the present invention, an image may be effectively encoded,thereby reducing a capacity of the encoded image.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 illustrates various examples of an intra prediction mode.

FIG. 2 is a block diagram illustrating a structure of an image encoderaccording to example embodiments;

FIG. 3 is a schematic view illustrating unidirectional predictionaccording to exemplary embodiments;

FIG. 4 illustrates an exemplary example of determining an encoding orderof each sub-block depending on a prediction mode;

FIG. 5 is a flowchart illustrating an exemplary example of determiningwhether to perform unidirectional prediction with reference to contextinformation of a reference macro block;

FIG. 6 is a flowchart illustrating an exemplary example of determiningan encoding mode with respect to a macro block;

FIG. 7 illustrates an exemplary example of determining whetherprediction modes of sub-blocks included in each sub-block group areidentical to each other;

FIG. 8 is a flowchart illustrating an exemplary example of omitting aMost Probable Mode (MPM) flag encoding to improve an encoding efficiencywhen MPM flags of sub-blocks included in each sub-block group areconsecutively identical to each other;

FIG. 9 is a flowchart illustrating an exemplary example of omitting anMPM flag to improve an encoding efficiency;

FIG. 10 illustrates an exemplary example of encoding a unidirectionalcoefficient indicating whether unidirectional prediction is applied;

FIG. 11 is a block diagram illustrating a structure of an image decoderaccording to exemplary embodiments;

FIG. 12 is a block diagram illustrating a structure of an image encoderaccording to other exemplary embodiments;

FIG. 13 is a block diagram illustrating a structure of an image encoderaccording to other exemplary embodiments; and

FIG. 14 is a block diagram illustrating a structure of an image decoderaccording to other exemplary embodiment.

BEST MODE FOR CARRYING OUT THE INVENTION

Reference will now be made in detail to embodiments of the presentinvention, examples of which are illustrated in the accompanyingdrawings, wherein like reference numerals refer to the like elementsthroughout. The embodiments are described below in order to explain thepresent invention by referring to the figures.

FIG. 1 illustrates various examples of an intra prediction mode.

A macro block intended to be encoded may be divided into at least onesub-block. An image encoder according to exemplary embodiments maycalculate a difference between a pixel value of each sub-block and apixel value of a reference pixel to generate a difference image, andencode the generated difference image.

When a value of the difference image is small, a relatively greaternumber of bits may be assigned to data within a small range, and therebyan image may be more accurately encoded to reduce a distortion.Depending on characteristics of an image included in each sub-block, alocation of an optimum reference pixel may differ. Accordingly, theimage encoder may select a location of the optimum reference pixeldepending on characteristics of the image included in each sub-block,and may designate any one of nine prediction modes illustrated in (a) to(i) of FIG. 1 as the prediction mode with respect to each sub-blockdepending on the location of the reference location.

In FIG. 1, pixels located on the same arrow may be encoded withreference to a pixel value of an identical reference pixel. For example,in (a) of FIG. 1, pixels located in a first column of a 4×4 sub-blockmay be encoded with reference to a reference pixel A. Also, in (b) ofFIG. 1, pixels located on a first row of the 4×4 sub-block may beencoded with reference to a reference pixel I.

When the prediction modes with respect to each sub-block are differentfrom each other, an image decoder of decoding an encoded image may beconsidered based on the prediction modes with respect to each sub-block.According to an exemplary embodiment, the image encoder may display theprediction modes with respect to each sub-block, and the image decodermay decode each sub-block with reference to the displayed predictionmodes.

The image encoder may assign 3 bits or 4 bits to display the predictionmodes with respect to each sub-block. When a 16×16 sized-macro block isdivided into a 4×4 sized sub-block, the 16×16 sized-macro block may bedivided into 16 sub-blocks, and displaying the prediction modes withrespect to each sub-block may include superfluous information.

By using an identical prediction mode with respect to each sub-blockincluded in an identical macro block, prediction modes with respect toeach sub-block may not need to be displayed. As a result, an imageencoding efficiency may be improved.

FIG. 2 is a block diagram illustrating a structure of an image encoderaccording to example embodiments. The image encoder according to thepresent exemplary embodiment includes an image predicting unit 210, anintra predicting unit 220, a difference signal generator 230, anencoding unit 250, and a decoding unit 240.

The image predicting unit 210 may include a motion predicting unit 201,a motion compensating unit 202, and an intra predicting unit 220, andmay generate a prediction image with respect to an original imageintended to be currently encoded.

Specifically, the intra predicting unit 220 may include an intraprediction selecting unit 211, a unidirectional prediction selectingunit 212, an intra predicting unit 213, an image block informationdetermining unit 214, an image block information analyzing unit 215, anda unidirectional prediction mode flag transmitting unit 216. The intrapredicting unit 220 may generate the intra prediction image with respectto the original image intended to be currently encoded.

Specifically, the image block information analyzing unit 215 may performa context information analysis based on context information of imageblocks 320 and 330 having been already decoded for an intra predictionof a current image block 310, as illustrated in FIG. 3. For example, thecontext information may be an MB type, a quantization coefficient, codedblock pattern (CBP) information, a coefficient value, and the like. Theimage block information determining unit 214 may determine whether theunidirectional prediction is enabled based on an analyzed result of theimage block information analyzing unit 215 to thereby determine whetherthe unidirectional prediction selecting unit 212 is practicallyperformed. When the unidirectional prediction selecting unit 212 isperformed, unidirectional prediction encoding information may beencoded.

The difference signal generator 230 may subtract a prediction imagegenerated in the image predicting unit 210 from the original imageintended to be currently encoded to generate a difference signal.

That is, the image predicting unit 210 may perform a motion predictionor a motion reference to encode a predetermined sized block in a currentframe (Fn) intended to be encoded, and the difference signal generator230 may generate a difference signal (Dn) with respect to a currentblock.

The encoding unit 250 may include a Discrete Cosine Transformation (DCT)unit 251, a quantization unit 252, a re-arrangement unit 253, and anentrophy encoder 254, and may encode an image with respect to thedifference signal outputted in the difference signal generator 230 usingthe DCT unit 251, the quantization unit 252, the re-arrangement unit253, and the entrophy encoder 254.

In addition, the decoding unit 240 may include an inverse quantizationunit 241, an inverse DCT 242, an adder 243, and a filter 244. Thedecoding unit 240 may correct an original block to thereby restore animage even in a process of encoding the current block or the currentframe in order to encode a subsequent block or a subsequent frame. Morespecifically, the decoding unit 240 may apply an inverse DCT and aninverse quantization process to a magnitude (output of the quantizationunit 252) of the difference signal to which a DCT and quantizationhaving been performed in the encoding unit 250, thereby restoring amagnitude of an original difference signal. The decoding unit 240 mayperform a motion compensation with respect to the restored differencesignal in the same manner as in the image predicting unit 210 to restorean original image, and may store the restored original image as a newreference image used for encoding a subsequent image.

FIG. 3 is a schematic view illustrating unidirectional predictionaccording to exemplary embodiments.

In (a) of FIG. 3, an example in which a prediction mode of a verticaldirection is applied to a first sub-block 311 included in a macro block310 is illustrated. Respective pixels included in the first sub-block311 may be encoded with reference to pixels included in a macro block350. According to an exemplary embodiment, pixels located in the lowestportion from among the pixels included in the macro block 350 may bereference pixels with respect to the first sub-block 311.

In (b) of FIG. 3, an example of the prediction mode of the verticaldirection is applied to a second sub-block 320 included in the macroblock 310 is illustrated. Each column included in the sub-block may beencoded with reference to the vertical direction. Respective pixelsincluded in the second sub-block 320 may be encoded with reference topixels included in the first sub-block 311, having already been encoded.Respective pixels included in the second sub-block 320 may be encodedwith reference to pixels, as reference pixels, located in the lowestportion from among the pixels of the first sub-block 311.

In (c) and (d) of FIG. 3, the prediction mode of the vertical directionmay also be applied to a third sub-block 330 and a fourth sub-block 340.Respective columns 331, 332, 333, 334, 341, 342, and 343 may be encodedwith reference to the vertical direction. Respective pixels included inthe third sub-block 330 may be encoded with reference to pixels includedin the macro block 350 as reference pixels. According to an exemplaryembodiment, pixels located in the lowest portion from among the pixelsincluded in the macro block 350 may be reference pixels with respect tothe first sub-block 330. Respective pixels included in the fourthsub-block 340 may be encoded with reference to pixels included in thethird sub-block 330, having already been encoded, as reference pixels.Respective pixels included in the fourth sub-block 340 may be encodedwith reference to pixels, as reference pixels, located in the lowestportion from among the pixels of the third sub-block 330.

The ‘unidirectional prediction’ used throughout the present inventionmay designate application of an identical prediction mode to therespective sub-blocks included in the macro block in a similar manner asin FIG. 3.

According to an exemplary embodiment, the image encoder may determinewhether the unidirectional prediction is applied to the macro block 310with reference to reference macro blocks 350 and 360 adjacent to themacro block 310.

According to an exemplary embodiment, the image encoder may determinewhether the unidirectional prediction is applied to the macro block 310with reference to context information of the reference macro blocks 350and 360.

According to an exemplary embodiment, the context information mayinclude at least one of an MB type with respect to the reference macroblock, a quantization coefficient, a CBP information, and a coefficientvalue.

FIG. 4 illustrates an exemplary example of determining an encoding orderof each sub-block depending on a prediction mode.

For example, when a downward and to the left diagonal directionillustrated in (b) of FIG. 4 is applied as a prediction mode, pixelsexisting in E, F, G, and H may be determined as reference pixels withrespect to respective sub-blocks, and the respective sub-blocks may beencoded using the determined reference pixels.

However, when the pixels existing in E, F, G, and H are determined asthe reference pixels, a distance between a sub-block of the downward andto the left diagonal direction and the reference pixel may besignificantly increased. As a result, a difference between a value ofthe reference pixel and a value of the pixel existing in the sub-blockof the downward and to the left diagonal direction may be significantlygreat. In this case, an encoding efficiency may be reduced.

According to an exemplary embodiment, when the diagonal down-leftdirection is applied as the prediction mode, the pixel existing in E, F,G, and H may be determined as the reference pixel to preferentiallyencode a sub-block of an upward and to the right diagonal direction.Next, pixels existing in the encoded sub-block of the diagonal up-rightmay be determined as reference pixels to encode the sub-block of thedownward and to the left diagonal direction.

That is, an encoding order with respect to respective sub-blocks may bedetermined depending on the prediction modes. Since a distance betweenthe reference pixel and the sub-block is small, a difference between avalue of the reference pixel and a value of a pixel intended to beencoded may not be great. That is, an accuracy of the prediction may beimproved, and the encoding efficiency may be improved.

Referring to FIG. 4, a concept of determining the encoding order withrespect to the respective sub-blocks depending on the prediction modeswill be herein described in detail.

As illustrated in (b) of FIG. 4, it is assumed that an 8×8 sized-blockis divided into four 4×4 blocks 430, 440, 450, and 460 and the dividedblocks are encoded.

According to a conventional art, an encoding order with respect torespective sub-blocks 430, 440, 450 and 460 may be determined withoutconsidering a prediction mode. Consequently, the respective sub-blocks430, 440, 450, and 460 each corresponding to upward and to the rightdiagonal direction, upward and to the left diagonal direction, downwardand to the right diagonal direction, and downward and to the leftdiagonal direction may be encoded in the order described above.

As illustrated in (a) of FIG. 4, it is assumed that the diagonaldown-left direction is determined as a prediction direction. Accordingto a conventional encoding scheme, when encoding the sub-blocks 440 and460 of up-left and the down-right, peripheral pixels used at the time ofprediction may be E, F, G, and H. Since right blocks of each block arenot encoded yet, N, O, P, and Q may not be used. Accordingly, since adistance between a pixel intended to be referred to and a pixel intendedto be encoded is relatively great, the prediction efficiency may bereduced.

According to an exemplary embodiment, an encoding order with respect torespective sub-blocks may be determined depending on prediction modeswith respect to the respective sub-blocks. As an example, an encodingorder with respect to the respective sub-blocks may be determined sothat a sub-block including a reference pixel is encoded prior to asub-block intended to be encoded.

As illustrated in (a) of FIG. 4, when a direction down-left direction isselected as a prediction mode, an encoding order may be determined sothat the respective sub-blocks 430, 440, 450, and 460 each correspondingto upward and to the right diagonal direction, upward and to the leftdiagonal direction, downward and to the right diagonal direction, anddownward and to the left diagonal direction are encoded in the statedorder as illustrated in (b) of FIG. 4.

Since the sub-block including the reference pixel is encoded prior tothe sub-block to be encoded, the respective sub-blocks may be encodedwith reference to a pixel of an adjacent block having been alreadyencoded. Since a distance between the reference pixel and the pixel tobe encoded is relatively small, the prediction efficiency may beimproved.

When the block of the diagonal down-left is the prediction mode, theremay exist peripheral pixels N, O, P, and Q located in a new adjacentblock having been already encoded. Accordingly, as illustrated in (a) ofFIG. 4, the sub-blocks may be encoded with reference to the peripheralpixels N, O, P, and Q.

Only the diagonal down-left direction was described in detail in FIG. 4,however, the present exemplary embodiment may be similarly applied withrespect to (h) vertical-left direction and (i) horizontal-up directionfrom among the prediction modes illustrated in FIG. 1.

FIG. 5 is a flowchart illustrating an exemplary example of determiningwhether to perform unidirectional prediction with reference to contextinformation of a reference macro block.

In operation S510, The image encoder may infer context information of areference macro block. The reference macro block may be a macro blockadjacent to a macro block intended to be encoded by the image encoder,and may be a macro block having been already encoded. Also, thereference macro block may include a reference pixel with respect to themacro block intended to be encoded by the image encoder.

According to an exemplary embodiment, the context information mayinclude at least one of an MB type with respect to the reference macroblock, a quantization coefficient, CBP information, and a coefficientvalue.

In operation S520, the image encoder may determine whether aunidirectional prediction is performed with respect to the macro blockintended to be encoded. According to an exemplary embodiment, the imageencoder may determine whether the unidirectional prediction is performedwith reference to the context information of the reference macro block.

In operation S530, when the unidirectional prediction is determined tobe performed in operation S520, the image encoder may perform theunidirectional prediction with respect to the macro block intended to beencoded. The unidirectional prediction may denote application of anidentical prediction mode to all sub-blocks included in the macro block.

According to an exemplary embodiment, the image encoder may select anoptimum prediction mode from among nine prediction modes illustrated inFIG. 1 to thereby apply the selected prediction mode to all sub-blocksincluded in the macro block.

According to an exemplary embodiment, the image encoder may encoderespective macro blocks depending on the nine prediction modes, andcalculate a rate-distortion cost with respect to the encoded image. Therate-distortion cost may be a value calculated considering both adistortion and data rate of an encoded image. The image encoder mayselect a prediction mode having a relatively low rate-distortion cost asan optimum prediction mode.

In operation S540, when the unidirectional prediction is determined notto be performed, the image encoder in operation S520, the image encodermay perform an intra prediction. The intra prediction may denote todetermine an optimal prediction mode with respect to the respectivesub-blocks included in the macro block, and different prediction modeswith respect to the respective sub-blocks may be determined.

In operation S550, the image encoder may encode the prediction mode. Theimage encoder may encode whether the unidirectional prediction isapplied to the macro block, and encode which prediction mode is theapplied prediction mode.

When the unidirectional prediction is not applied, the image encoder mayencode the prediction mode applied with respect to the respectivesub-blocks.

FIG. 6 is a flowchart illustrating an exemplary example of determiningan encoding mode with respect to a macro block.

In operation S610, the image encoder may divide a macro block into aplurality of sub-blocks.

In operation S620, the image encoder may determine a unidirectionalprediction mode with respect to the macro block. The unidirectionalprediction mode determined in operation S620 may be one of theprediction modes illustrated in FIG. 1.

In operation S630, the image encoder may encode the macro blockaccording to the determined prediction mode. The image encoder may applyan identical prediction mode to each of the plurality of sub-blocksincluded in the macro block to thereby encode the macro block.

In operation S640, the image encoder may determine whether an encodingis performed with respect to all prediction modes. When the encoding isnot performed with respect to all prediction modes, the image encodermay determine, as the unidirectional prediction mode, a prediction modeto which an encoding is not yet performed in operation S620.

In operation S650, the image encoder may determine a prediction modewith respect to each of the plurality of sub-blocks. The image encodermay determine different prediction modes with respect to each of theplurality of sub-blocks.

In operation S660, the image encoder may encode each of the plurality ofsub-blocks according to the prediction mode differentially determinedwith respect to each of the plurality of sub-blocks.

That is, in operations S650 and S660, the image encoder may encode themacro block according to an intra mode.

In operation S670, the image encoder may select an optimal encoding modefrom among the unidirectional prediction mode and the intra mode. Sincean optimal prediction mode is selected with respect to each of theplurality of sub-blocks, the intra mode may have less distortion incomparison with the unidirectional prediction mode.

However, since the unidirectional prediction mode applies an identicalprediction mode with respect to each of the plurality of sub-blocks,there is no need to store the prediction mode with respect to each ofthe plurality of sub-blocks. As a result, the macro block may be encodedusing a data rate less than that of the intra mode.

In operation S670, the image encoder may calculate a rate-distortioncost with respect to the unidirectional prediction mode and the intramode, and select an optimal encoding mode based on the calculatedrate-distortion cost.

FIG. 7 illustrates an exemplary example of determining whetherprediction modes of sub-blocks included in each sub-block group areidentical to each other.

The image encoder may divide each of the plurality of sub-blocksincluded in a macro block into at least one sub-block group 710, 720,730, and 740. In FIG. 7, an example in which each sub-block groupincludes four sub-blocks is illustrated, however, according to anotherexemplary embodiment, each sub-block may have differentnumbered-sub-blocks.

The image encoder may determine an optimal encoding mode with respect toeach sub-block. A numeral expressed on each sub-block may designate anoptimal encoding mode determined with respect to each sub-block.

A first sub-block 711, a second sub-block 712, and a third sub-block 713may have a first encoding mode as the optimal encoding mode, from amongrespective sub-blocks 711, 712, 713, and 714 included in a firstsub-block group 710, and a fourth sub-block 714 may have a secondencoding mode as the optimal encoding mode. That is, the encoding modesof the sub-blocks 711, 712, 713, and 714 included in the first sub-blockgroup 710 are not the same.

Whereas, respective sub-blocks 721, 722, 723, and 724 included in asecond sub-block group 720 may have an identical encoding mode of asecond encoding mode.

According to an exemplary embodiment, the image encoder may encodewhether encoding modes of the sub-blocks included in each sub-blockgroup are all the same.

When the encoding modes are all the same, the image encoder may displayan encoding mode with respect to each sub-block group, and may notdisplay an encoding mode with respect to each sub-block. As a result, anumber of bits required for encoding may be reduced, and an encodingefficiency may be improved.

FIG. 8 is a flowchart illustrating an exemplary example of omitting aMost Probable Mode (MPM) flag encoding to improve an encoding efficiencywhen MPM flags of sub-blocks included in each sub-block group areconsecutively identical to each other.

In operation S810, an image encoder may determine a prediction mode withrespect to each sub-block. Also, the image encoder may predict theprediction mode with respect to each sub-block.

In operation S820, the image encoder may check sub-blocks in which thepredicted prediction mode and the determined prediction mode are thesame from among a plurality of sub-blocks. Hereinafter, when thepredicted prediction mode and the determined prediction mode are thesame, the sub-block may be encoded using an MPM.

In operation S830, the image encoder may set an MPM-SKIP-Flag as ‘1’,when a sub-block encoded using the MPM within a macro block is present,and when the sub-block encoded using the MPM within the macro block isnot present, the image encoder may set the MPM-SKIP-Flag as ‘0’.

In operation S840, the image encoder may compare a value of theMPM-SKIP-Flag with ‘1’. When the value of the MPM-SKIP-Flag is not ‘1’,it indicates that the sub-block encoded using the MPM is present, andthus the image encoder may check the sub-block encoded using the MPM inoperation S860 to generate an MPM omission pattern, and encode aprediction mode with respect to the sub-block using the MPM omissionpattern.

A specific configuration of encoding the prediction mode with respect tothe sub-block using the MPM omission pattern will be described in detailwith reference to FIG. 9.

In operation S870, the image encoder may encode remaining transformationcoefficients with respect to a difference image.

FIG. 9 is a flowchart illustrating an exemplary example of omitting anMPM flag to improve an encoding efficiency.

In operation S910, an image encoder may initialize i for counting arepeated frequency in order to perform an MPM omission pattern encoding.

In operation S920, the image encoder may encode an [i]-th bit of the MPMomission pattern. The image encoder may group consecutive N sub-blocksincluded in a macro block to set a sub-block group. The image encodermay encode the [i]-th bit of the MPM omission pattern with respect to ani-th sub-block group. As an example, an (i+1)-th sub-block group mayinclude an (i*N)-th sub block group to an {N*(i+1)-1}-th sub-blockgroup.

When an (i*N)-th sub block to an {N*(i+1)-1}-th sub-block included inthe (i+1)-th sub-block group from among the sub-blocks included in themacro block are all encoded using the MPM mode, the image encoder mayencode the [i]-th bit of the MPM omission pattern as ‘1’. Otherwise, theimage encoder may encode the [i]-th bit of the MPM omission pattern as‘0’.

In operation S930, the image encoder may check a value of the [i]-th bitof the MPM omission pattern. When the value of the [i]-th bit of the MPMomission pattern is ‘1’, the (i*N)-th sub block group to the{N*(i+1)-1}-th sub-block of the macro block are all encoded using theMPM mode, and thus the image encoder may omit a prediction mode encodingwith respect to the (i*N)-th sub block group to the {N*(i+1)-1}-thsub-block may be omitted in operation S940. When the value of the [i]-thbit of the MPM omission pattern is ‘0’, the image encoder may performthe prediction mode encoding with respect to the (i*N)-th sub blockgroup to the {N*(i+1)-1}-th sub-block of the macro block.

In operation S960, the image encoder may determine whether theprediction mode encoding with respect to each sub-block is terminated.When the prediction mode encoding is not terminated, the image encodermay increase i in operation S970, and perform the prediction modeencoding with respect to a subsequent sub-block group.

Referring to FIGS. 8 and 9, when similar information with respect toconsecutive sub-blocks is determined to have an identical value, anencoding only with respect to an initial sub-block may be performed, andthen an encoding with respect to subsequent sub-blocks may be omitted,thereby improving an encoding efficiency.

FIG. 10 illustrates an exemplary example of encoding a unidirectionalcoefficient indicating whether unidirectional prediction is applied.

The unidirectional coefficients 1012 indicating whether theunidirectional prediction is applied 1012 to a macro block may beencoded together with an MB type with respect to the macro block. Whenthe unidirectional prediction is not applied to the macro block, a valueof the unidirectional coefficient 1012 may be ‘0’. In this case, aconventional intra prediction mode is applied to the macro block. Whenthe intra prediction mode is applied to the macro block, a predictionmode flag or prediction mode data 1031, 1032, and 1033 with respect toeach sub-block may be encoded.

When the unidirectional prediction is applied to the macro block, thevalue of the unidirectional coefficient 1012 may be ‘1’. In this case, aprediction mode flag 1034 and prediction mode data 1035 with respect tothe macro block may be encoded once. Accordingly, when theunidirectional prediction is applied to the macro block, a number ofbits required for encoding the prediction mode may be reduced, and adata rate may be improved.

The unidirectional coefficients 1012 may be encoded together with achroma prediction mode 1041, a CBP 1042, a delta QP, and luma/chromacoefficients 1044.

According to another exemplary embodiment, even when the unidirectionalprediction is applied to the macro block, information about theunidirectional prediction mode applied to the macro block may not beencoded. That is, even when the unidirectional prediction is applied tothe macro block, the prediction mode flag and the prediction mode datamay not be encoded. The image encoder may predict the unidirectionalprediction mode based on context information of a reference macro blockwith respect to the macro block.

FIG. 11 is a block diagram illustrating a structure of an image decoderaccording to exemplary embodiments. The image decoder includes an imagedecoding unit 1110, an intra predicting unit 1120, and a decoding unit1130.

The decoding unit 1130 may include an entropy decoder 1131, are-arrangement unit 1132, an inverse quantization unit 1133, and aninverse DCT unit 1134, and may perform decoding processes such as anentropy decoding, data re-arrangement, an inverse-quantization, and aninverse DCT with respect to a bit column received from the image encoderdescribed in FIG. 1, in a similar manner as in an existing movingpicture compression standards.

The image decoding unit 1110 may include a motion compensating unit 111,an intra prediction unit 1120, an adder 1112, and a filter 1113, and maydecode an original image using a decoded difference signal and areference image (previous image).

The intra prediction unit 1120 may include an image block informationanalyzing unit 1121, an image block information determining unit 1122, aprediction method determining unit 1123, a unidirectional predictionmode flag receiving unit 1124, an intra prediction unit 1125, and aunidirectional prediction unit 1126, and generate an intra predictionimage with respect to an image intended to be currently decoded.

Specifically, the image block information analyzing unit 1121 mayanalyze context information based on context information of a macroblock having been already decoded for the purpose of intra prediction ofa macro block intended to be decoded. For example, an MB type, aquantization coefficient, CBP information, a coefficient value, and thelike may be the context information.

The image block information determining unit 1122 may determine whetherthe unidirectional prediction is possible to be performed based on ananalyzed result of the image block information analyzing unit 1121.

The prediction method determining unit 1123 may perform an intraprediction by selecting one of the intra prediction unit 1125 and theunidirectional prediction unit 1126 through a value transmitted from theimage block information determining unit 1122 and the unidirectionalprediction mode flag receiving unit 1124.

For example, when the image block information determining unit 1122determines a unidirectional prediction method is impossible to beperformed, the intra prediction may be performed by the intra predictionunit 1125, and when the image block information determining unit 1122determines the unidirectional prediction method is possible to beperformed, the intra prediction unit 1125 may be selected to perform theintra prediction in a case of a flag value transmitted from theunidirectional prediction mode flag receiving unit 1124 having a valueof ‘0’, and the unidirectional prediction unit 1126 may be selected toperform the intra prediction in a case of the flag value having a valueof ‘1’.

Also, even when a value of a unidirectional prediction method flag is‘0’, values of an intra prediction mode flag and intra mode informationmay exist as illustrated in FIG. 10.

According to another exemplary embodiment, even when the value of theunidirectional prediction method flag is ‘1’, the values of the intraprediction mode flag and intra mode information may not exist. In thiscase, the image decoder may predict the prediction mode of the macroblock based context information of the reference macro block. In thismanner, a practical intra prediction may be performed using the intraprediction mode flag and the intra mode information.

FIG. 12 is a block diagram illustrating a structure of an image encoderaccording to other exemplary embodiments.

A dividing unit 1210 may divide a macro block into a plurality ofsub-blocks.

A unidirectional application determining unit 1220 may determine whetheran identical prediction mode is applied to each sub-block included inthe macro block. When the identical prediction mode is applied to eachsub-block, a unidirectional prediction mode may be referred to beapplied.

According to an exemplary embodiment, the unidirectional applicationdetermining unit 1220 may determine whether the identical predictionmode is applied to each sub-block included in the macro block intendedto be encoded with reference to context information of a reference macroblock with respect to the macro block to be encoded.

The reference macro block may be adjacent to the macro block intended tobe encoded. Also, the context information of the reference macro blockmay include at least one of an MB type with respect to the referencemacro block, a quantization coefficient, CBP information, a coefficientvalue, and the like.

The prediction mode determining unit 1230 may determine the predictionmode with respect to each sub-block based on a determined result of theunidirectional application determining unit 1220. For example, when theunidirectional application determining unit 1220 applies theunidirectional prediction mode, the prediction mode determining unit1230 may determine which prediction mode is applied to each sub-blockincluded in the macro block.

The prediction mode determining unit 1230 may determine any one ofvarious prediction modes illustrated in FIG. 1, as the prediction modewith respect to the macro block.

As an example, the prediction mode determining unit 1230 may encode themacro block based on the various prediction modes illustrated in FIG. 1,and determine an optimal prediction mode from among the variousprediction modes. The prediction mode determining unit 1230 maycalculate a rate-distortion cost of an encoded macro block based on thevarious prediction modes, and determine a prediction mode having aminimal rate-distortion cost as the optimal prediction mode.

The prediction mode encoding unit 1250 may store information about theprediction mode based on the determined prediction mode. According to anexemplary embodiment, when the identical prediction mode is determinedto be applied to each sub-block included in the macro block, theprediction mode encoding unit 1250 may store information about whetherthe identical prediction mode is applied and information about thedetermined prediction mode.

When the identical prediction mode is not applied, the prediction modemay need to be encoded with respect to each sub-block. As a result,number of bits corresponding to a product of a number of bits requiredfor encoding the prediction mode and a number of respective sub-blocksmay be additionally needed.

However, when the identical prediction mode is applied to eachsub-block, only the number of bits required for encoding the predictionmode applied to the sub-block included in the macro block may be needed.Accordingly, when the identical prediction mode is applied to eachsub-block, the prediction mode may be encoded using a smaller number ofbits.

According to another exemplary embodiment, one prediction mode may beapplied to the entire macro block, however, one prediction mode may beapplied to a partial macro block.

According to an exemplary embodiment, a grouping unit 1240 may groupdivided sub-blocks into a plurality of sub-block groups. For example,the grouping unit 1240 may group consecutive sub-blocks into onesub-block group.

When prediction modes of all sub-blocks included in a specific sub-blockgroup are identical to one another, the prediction mode encoding unit1250 may encode whether the prediction modes are identical to oneanother. Also, the prediction mode encoding unit 1250 may encodeinformation about the prediction mode applied to each sub-block. Similarto a case in which the unidirectional prediction mode is applied to themacro block, even when the prediction modes of all sub-blocks includedin the sub-block group are identical to one another, the prediction modemay be encoded using a smaller number of bits.

The encoding unit 1260 may encode each sub-block based on the predictionmode determined with respect to each sub-block.

FIG. 13 is a block diagram illustrating a structure of an image encoderaccording to other exemplary embodiments.

A dividing unit 1310 may divide a macro block into a plurality ofsub-blocks.

The prediction mode determining unit 1330 may determine a predictionmode with respect to each sub-block. According to an exemplaryembodiment, the prediction mode determining unit 1330 may determine onemode of the various prediction modes illustrated in FIG. 1 as theprediction mode with respect to each sub-block. Also, the predictionmode determining unit 1330 may determine different prediction modes withrespect to each sub-block included in the macro block.

The prediction mode determining unit 1330 may determine the predictionmode based on a rate-distortion cost with respect to each sub-blockaccording to the various prediction modes. The prediction modedetermining unit 1330 may calculate a rate-distortion cost with respectto each sub-block, and determine a prediction mode having a minimalrate-distortion cost as an optimal prediction mode.

The encoding order determining unit 1340 may determine an encoding orderwith respect to each sub-block based on the prediction mode with respectto each sub-block. According to an exemplary embodiment, the encodingorder determining unit 1340 may determine the encoding order withrespect to each sub-block so that a sub-block intended to be encoded isencoded with reference to a sub-block having been already encoded.

A reference pixel determining unit 1350 may determine a reference pixelwith respect to each sub-block considering the encoding order of eachsub-block. According to an exemplary embodiment, the reference pixeldetermining unit 1350 may determine a pixel of the sub-block having beenalready encoded as the reference pixel with respect to the sub-blockintended to be encoded.

According to an exemplary embodiment, a grouping unit 1360 may groupdivided sub-blocks into a plurality of sub-block groups, and aprediction mode encoding unit 1380 may encode whether prediction modesof sub-blocks included in each sub-block group are all the same.

Similar to a case in which the unidirectional prediction mode is appliedto the macro block, even when the prediction modes of all sub-blocksincluded in the sub-block group are all the same, the prediction modemay be encoded using a smaller number of bits.

According to an exemplary embodiment, a prediction mode predicting unit1370 may predict a prediction mode with respect to each sub-block. As anexample, the prediction mode predicting unit 1370 may predict aprediction mode of a sub-block intended to be encoded with reference toa reference sub-block adjacent to the sub-block intended to be encoded.When the sub-block intended to be encoded and the reference sub-blockare adjacent to each other, characteristics of the sub-block intended tobe encoded and the reference sub-block may be similar to each other. Inthis case, a prediction mode of the reference sub-block and a predictionmode of the sub-block intended to be encoded may be similar to eachother.

The prediction mode encoding unit 1380 may determine whether a MostProbable Mode (MPM) predicted with respect to the sub-block intended tobe encoded and the prediction mode determined by the prediction modedetermining unit 1370 are the same, and encode whether the predicted MPMand the determined prediction mode are the same.

When the predicted MPM and the determined prediction mode are the same,the image decoder may also similarly predict a prediction mode withrespect to a sub-block intended to be decoded, and the determinedprediction mode may not need to be encoded.

FIG. 14 is a block diagram illustrating a structure of an image decoder1400 according to other exemplary embodiment. The image decoder 1400 mayinclude a unidirectional application determining unit 1410, a groupingunit 1420, a decoding order determining unit 1430, a reference pixeldetermining unit 1440, and a decoding unit 1450.

The unidirectional application determining unit 1410 may determinewhether an identical prediction mode is applied to all sub-blocksincluded in a macro block. According to an exemplary embodiment, theimage encoder of encoding the macro block may store, in a macro blockheader, whether the identical prediction mode is applied to allsub-blocks, and the unidirectional application determining unit 1410 maydetermine, using information stored in the macro block header, whetherthe identical prediction mode is applied to all sub-blocks.

The decoding unit 1450 may decode each sub-block based on a determinedresult with respect to the macro block. When the identical predictionmode is applied to all sub-blocks included in the macro block, eachsub-block may be decoded using the applied identical prediction mode.

According to another exemplary embodiment, when the identical predictionmode is not applied to all sub-blocks included in the macro block, thegrouping unit 1420 may group consecutive sub-blocks, from among thesub-blocks included in the macro block, into a sub-block group, and theunidirectional application determining unit 1410 may determine whetherthe identical prediction mode is applied to sub-blocks included in eachsub-block group.

The decoding unit 1450 may decode each sub-block based on a determinedresult with respect to the macro block. When the identical predictionmode is not applied to all sub-blocks included in the macro block, eachsub-block may be decoded using the applied identical prediction mode.

The decoding order determining unit 1430 may determine a decoding orderwith respect to each sub-block depending on the prediction mode appliedto each sub-block. As an example, the decoding order determining unit1430 may determine the decoding order of each sub-block so that eachsub-block is decoded with reference to a reference sub-block having beenalready decoded. The decoding unit 1450 may decode each sub-block basedon the determined decoding order.

The reference pixel determining unit 1440 may determine a referencepixel with respect to each sub-block considering the decoding order ofeach sub-block. According to an exemplary embodiment, the referencepixel determining unit 1440 may determine a pixel of a sub-block havingbeen already decoded as the reference pixel with respect to a sub-blockintended to be decoded. The decoding unit 1450 may decode each sub-blockwith reference to the reference pixel with respect to each sub-block.

Although a few embodiments of the present invention have been shown anddescribed, the present invention is not limited to the describedembodiments. Instead, it would be appreciated by those skilled in theart that changes may be made to these embodiments without departing fromthe principles and spirit of the invention, the scope of which isdefined by the claims and their equivalents.

1. An image decoding apparatus, comprising: an intra-prediction unitconfigured to perform intra prediction on a first block, perform intraprediction on a second block adjacent to a right side of the firstblock, perform intra prediction on a third block adjacent to a bottom ofthe first block, and perform intra prediction on a fourth block adjacentto a right bottom of the first block, wherein the first block, thesecond block, the third block, and the fourth block are predicted in oneintra prediction mode, wherein the first block, the second block, thethird block, and the fourth block form a prediction block predicted inone intra prediction mode, wherein the first block, the second block,the third block, and the fourth block are transform blocks on whichintra prediction is performed, wherein a size of the first block, a sizeof the second block, a size of the third block and a size of the fourthblock are the same, and wherein a width of the prediction block is equalto a height of the prediction block.
 2. The image decoding apparatus ofclaim 1, wherein intra prediction mode information on the first block,the second block, the third block, and the fourth block is decoded once.3. An image encoding apparatus, comprising: an intra-prediction unitconfigured to perform intra prediction on a first block, perform intraprediction on a second block adjacent to a right side of the firstblock, perform intra prediction on a third block adjacent to a bottom ofthe first block, and perform intra prediction on a fourth block adjacentto a right bottom of the first block, wherein the first block, thesecond block, the third block, and the fourth block are predicted in oneintra prediction mode, wherein the first block, the second block, thethird block, and the fourth block form a prediction block predicted inone intra prediction mode, wherein the first block, the second block,the third block, and the fourth block are transform blocks on whichintra prediction is performed, wherein a size of the first block, a sizeof the second block, a size of the third block and a size of the fourthblock are the same, and wherein a width of the prediction block is equalto a height of the prediction block.
 4. The image encoding apparatus ofclaim 3, wherein intra prediction mode information on the first block,the second block, the third block, and the fourth block is encoded once.5. The image encoding apparatus of claim 3, wherein a bit-streamgenerated by the image encoding apparatus comprises the intra predictioninformation, and wherein the intra prediction mode information isdecoded once for a decoding of the first block, the second block, thethird block and the fourth block by an image decoding apparatus.
 6. Anon-transitory computer-readable medium storing a bitstream, thebitstream comprising: intra prediction mode information; wherein intraprediction on a first block is performed, intra prediction on a secondblock adjacent to a right side of the first block is performed, intraprediction on a third block adjacent to a bottom of the first block isperformed, and intra prediction on a fourth block adjacent to a rightbottom of the first block is performed, wherein the first block, thesecond block, the third block, and the fourth block are predicted in oneintra prediction mode, wherein the first block, the second block, thethird block, and the fourth block form a prediction block predicted inone intra prediction mode, wherein the first block, the second block,the third block, and the fourth block are transform blocks on whichintra prediction is performed, wherein a size of the first block, a sizeof the second block, a size of the third block and a size of the fourthblock are the same, and wherein a width of the prediction block is equalto a height of the prediction block.
 7. The non-transitorycomputer-readable medium of claim 5, wherein the intra prediction modeinformation on the first block, the second block, the third block, andthe fourth block is decoded once.